﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PPE_gestion_commercial;
using System.Windows.Forms;

namespace testUnitaire
{
    [TestClass]
    public class UnitTest1
    {
        public Commande commandetest = new Commande();
        [TestMethod]
        public void TestMethod5()
        {
            
            commandetest.Show();
            commandetest.dataGridView2.Rows[0].Cells[0].Value = 1;
            Assert.AreEqual(1, 1);
            commandetest.Hide();
            
        }
        [TestMethod]
        public void TestMethod4()
        {
            commandetest.Show();
            commandetest.rafraichirProduit();
            Assert.AreEqual(1, 1);
            commandetest.Hide();
        }
        [TestMethod]
        public void TestMethod1()
        {
            commandetest.Show();
            commandetest.rafraichirProduit();
            Assert.IsNotNull(commandetest.dataGridView2.Rows[0].Cells[0]);
            commandetest.Hide();
         }
        [TestMethod]
        public void TestMethod2()
        {
            commandetest.Show();
            commandetest.rafraichirProduit();
            Assert.AreNotEqual("", commandetest.dataGridView2.Rows[0].Cells[0]);
            commandetest.Hide();
        }
        
    }
}
